package core

import (
	"stock/router"
	"stock/system/middleware"

	"github.com/gin-gonic/gin"
)

func Engine() {

	eng := gin.Default()
	eng.Use(middleware.Cors())

	router.ApiRouter(eng)
	router.ViewRouter(eng)

	eng.Run(":8080")
}
